#include "innercity.h"
#include <cstring>
#include <iostream>
#include <cmath>
using namespace std;
const int INF = 0x3f3f3f3f;

innercity::innercity()
{
    this->inum = 11;
    this->irnum = 55;//用不到道路的总条数，按照完全图设定
    //城市具体信息表
    this->in[0]={"1公寓","oneap",0,100,100};
    this->in[1]={"2公寓","twoap",1,200,200};
    this->in[2]={"3公寓","threeap",2,300,300};
    this->in[3]={"1教","oneed",3,400,400};
    this->in[4]={"2教","twoed",4,500,500};
    this->in[5]={"3教","threeed",5,600,600};
    this->in[6]={"实验楼","lab",6,700,700};
    this->in[7]={"东餐","cafe",7,800,800};
    this->in[8]={"北操场","play",8,900,900};
    this->in[9]={"超市","spt",9,1000,1000};
    //map 映射表
    this->getId["dorm1"]=0;
    this->getId["dorm2"]=1;
    this->getId["dorm3"]=2;
    this->getId["c1"]=3;
    this->getId["c2"]=4;
    this->getId["c3"]=5;
    this->getId["lab"]=6;
    this->getId["cafe"]=7;
    this->getId["pg"]=8;
    this->getId["spm"]=9;

    //道路信息
    //dir是距离的邻接矩阵
    dir[0][0]=0;
    dir[1][1]=0;
    dir[2][2]=0;
    dir[3][3]=0;
    dir[4][4]=0;
    dir[5][5]=0;
    dir[6][6]=0;
    dir[7][7]=0;
    dir[8][8]=0;
    dir[9][9]=0;
    dir[10][10]=0;
    for(int i=0;i<inum;i++){
        for(int j=0;j<inum;j++){
            if(i!=j)
                dir[i][j]=5*abs(j-i)+3*i+(10-i);
        }
    }
    for(int i=0;i<inum;i++){
        for(int j=0;j<inum;j++){
            itt[i][j]=dir[i][j]*1.0/15;
        }
    }
}


